﻿@model IEnumerable<HotelManageSystem.Models.ProductProviderModel>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutWarehouseInstall.cshtml";
}

@section Head
{
    <link href= "@Url.Content("~/Content/TelerikGrid.css")"rel="stylesheet" type="text/css"></link>
}
@{
    Html.Telerik().Grid(Model)
        .Name("ProductProvider")
        .DataKeys(keys => keys.Add(x => x.ID))
        .ToolBar(commands => commands.Insert())
        .DataBinding(dataBinding => dataBinding.Ajax()
                                        .Select("TelerikAjax", "ProductProvider")
                                        .Insert("Insert", "ProductProvider")
                                        .Update("Update", "ProductProvider")
                                        .Delete("Delete", "ProductProvider")
        )
        .Pageable()
        .Sortable()
        .Columns(columns =>
                     {
                         columns.Bound(p => p.Name).Title("提供商");
                         columns.Bound(p => p.Tel).Title("电话");
                         columns.Bound(p => p.Address).Title("地址");
                         columns.Command(commands =>
                                             {
                                                 commands.Edit();
                                                 commands.Delete();
                                             });
                     }
        )
        .Editable(editing=>editing.Mode(GridEditMode.PopUp))
        .Filterable()
        .Groupable()
        .Scrollable()
        .Render();
    ;
        
        
}